import http from "@/api/http";

export function getTree() {
  return http.get({ url: "/system/dept/tree" });
}

export function getDept(id: number) {
  return http.get({
    url: "/system/dept/" + id
  });
}

export function saveDept(obj: any) {
  return http.post({
    url: "/system/dept",
    data: obj
  });
}

export function updateDept(obj: any) {
  return http.put({
    url: "/system/dept",
    data: obj
  });
}

export function delDept(id: number) {
  return http.delete({
    url: "/system/dept/" + id
  });
}
